package chapter04.d1_fileio.demo2;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: jack_yang
 * @Date: 2024/5/8
 * @Description: addition and subtraction
 */
public class FileReaderTest1 {
    public static void main(String[] args) throws FileNotFoundException {
        File file = new File("D:\\test.txt");
        try {
            FileReader fileReader = new FileReader(file);
            int a;
            while((a=fileReader.read()) != -1){
                System.out.print((char)a);
            }
        }catch (Exception e){
            e.printStackTrace();
        }


    }
}
